package com.coolgor.coldot.dto.stock;

import com.coolgor.coldot.entity.stock.StockInfo;
import com.coolgor.coldot.enums.stock.StockInfoOperationStateEnum;

import java.util.List;


public class StockInfoExecution {

	// 结果状态 
	private int state;
	// 结果状态标识 
	private String stateInfo;
	// 执行结果的数量 
	private int count;
	// 操作的对象(增删改的时候用到)
	private StockInfo stockInfo;
	// 获取的结果列表(查询列表的时候使用)
	private List<StockInfo> stockInfoList;

	// 构造器
	public StockInfoExecution() {}

	// 操作失败的时候使用的构造器
	public StockInfoExecution(StockInfoOperationStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	// 增删改 操作成功的时候使用的构造器
	public StockInfoExecution(StockInfoOperationStateEnum stateEnum, StockInfo stockInfo) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.stockInfo = stockInfo;
	}

	// 查询 操作成功的时候使用的构造器
	public StockInfoExecution(StockInfoOperationStateEnum stateEnum, List<StockInfo> stockInfoList) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.stockInfoList = stockInfoList;
	}


	// 下面都是getter 和setter

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public StockInfo getStockInfo() {
		return stockInfo;
	}

	public void setStockInfo(StockInfo stockInfo) {
		this.stockInfo = stockInfo;
	}

	public List<StockInfo> getStockInfoList() {
		return stockInfoList;
	}

	public void setStockInfoList(List<StockInfo> stockInfoList) {
		this.stockInfoList = stockInfoList;
	}

}